<div class="table-body">
    <table id="balanceTable" lay-filter="balanceTable"></table>
</div>

<script>
    layui.use(['form', 'table'], function () {
        var tableIn =layui.table.render({
            elem: '#balanceTable',
            height: 'full-99',
            cellMinWidth: '80',
            url: "{:url('getNewBin')}",
            id: 'balanceTable',
            totalRow: true,
            toolbar: '#toolbar',
            defaultToolbar: ['filter', 'exports'],
            cols: [[
                { type: 'numbers'},
                { field: 'cardBin', align: 'left', title: 'cardBin' , width:150 },
                { field: 'cardClass', align: 'left', title: 'cardClass' , width:200 },
                { field: 'isPrepaid', align: 'left', title: 'isPrepaid', width:150 },
                { field: 'is_used', title: '是否使用', width:100 ,
                    templet:function (d) {
                        const is_used  =   d.is_used;
                        var   html          =   '';
                        switch (is_used) {
                            case 0:
                                html = "<span style='color: #8c8c8c'>未使用</span>";
                                break;
                            case 1:
                                html = "<span style='color: green'>已使用</span>";
                                break;
                        }
                        return html;
                    }
                },
            ]],
            page: true,
            limit: 10000,
            limits: [10000],
        });
    });
</script>